<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <!--<meta http-equiv="refresh" content="5;url=index.html">--> 
    <title>登录页面</title>
</head>
<style>
    *{
        margin:0;padding:0;
    }
    body{
        font-size: 14px;
    }
    a{
        text-decoration: none;
        color:#fff;
        font-size: 12px;
    }
    .login{
        width:300px;height:300px;
        position:fixed;left:0;right:0;bottom:0;top:0;margin: auto;
        background-color: rgba(0,0,0,.9);
    }
    h2{
        font-weight: normal;
        text-align: center;
        color: #4494ff;
        font-size: 18px;
        padding:15px 0 8px 0;
        border-bottom:2px solid #4494ff;
    }
    input{
        display: block;
        width:180px;
        margin:0 auto;
        padding:12px 0 12px 40px;
        border:0;outline: 0;
    }
    input:nth-child(1){
        margin-top: 20px;
        margin-bottom: 10px;
        text-indent: 1em;
    }
    input:nth-of-type(2){
        text-indent: 1em;
    }
    input:nth-of-type(3){
        padding:10px 0 10px 0;
        width:220px;
        margin-top:20px;
        background-color: #00AAEE;
        color:#fff;
        font-size: 18px;
        letter-spacing: 8px;
        border-radius: 4px;
    }
    .wj{
        margin-top:10px;
        margin-bottom:20px;
        padding-right:40px;
        text-align: right;
    }
    .register{
        margin-top:10px;
        padding-right:40px;
        text-align: right;
    }
    .register a{
        color: #00AAEE;
    }
    span{
        font-family: 'iconfont';
        display: block;
        position: absolute;
        width:40px;height:39px;
        background: #AAABAB;
        left:40px;color:#fff;
        font-size: 25px;
        text-align: center;line-height: 39px;
    }
    .user{
        top:66px;
    }
    .pass{
        top:115px;
    }
	body{
		background: url(../img/project/1.png) no-repeat;
		background-size: 100%;
		/*background-repeat: no-repeat;*/
		
	}
</style>
<body>
    <section class="login">
        <header>
            <h2>账号登录</h2>
        </header>
        <form action="" name="myform">
            <input type="text" name="user" placeholder="邮箱/手机号" required autofocus="true">
            <!--pattern="/^[a-zA-Z0-9]\w+@[a-zA-Z]+\.+(com|cc|org|net|cn|com.cn)$/"-->
            <span class="user">&#xe600;</span>
            <input type="password" name="pass" required >
            <!--pattern="/^[a-zA-Z]\w{5,18}$/"-->
            <span class="pass">&#xe601;</span>
            <div class="wj"><a href="">忘记登录密码?</a></div>
	  		<input type="submit" value="登录">
            <div class="register">免费注册</div>
        </form>
        <!--<a href="index.html">1111111</a>-->
    </section>
    
</body>
<script>
    var tel=document.querySelector("[type=text]");
    var password=document.querySelector("[type=password]");
    var login=document.querySelector("[type=submit]");
    var d=document.querySelector("d");
    login.onclick=function () {
        var arr = JSON.parse(localStorage.message);
        var flag = false;
        for (var i = 0; i < arr.length; i++) {
            if (arr[i].tel == tel.value && arr[i].password == password.value) {
//                alert("登录成功");
                flag = true;
                break;
            }
        }
        if (flag) {
//          alert("成功");
//        self.location='index.html'; 
//			setTimeout("javascript:location.href='index.html'", 2000); 
//			 location.href = 'a.asp?d_id=' + d + '&d_name=' + name;
//			window.navigate("index.html");
			 window.open("index.html","self")
			
            
        } else {
            alert("失败");
        }
    }
</script>
</html>